import React from 'react';
import { Spin } from 'antd';
import './LoadingIndicator.css';

interface LoadingIndicatorProps {
    loading: boolean;
}

const LoadingIndicator: React.FC<LoadingIndicatorProps> = ({ loading }) => {
    return (
        <div className={`loading-indicator ${loading ? 'active' : ''}`}>
            {loading && (
                <Spin className="overlay" tip="Loading" size="large">
                    <div></div>
                </Spin>
            )}
        </div>
    );
};

export default LoadingIndicator;
